//引入mongoose
const mongoose = require("mongoose");

//创建骨架
var commoditySchema = mongoose.Schema({
  "productName" : String,
  "title" : String,
  "imgURL" : Array,
  "originalPrice" : Number,
  "currentPrice" : Number,
  "discounts" : Number,
  "productId" : String
});

//创建模型
var commodityModel = mongoose.model('commoditys', commoditySchema);
//暴露
module.exports = commodityModel;
